package org.objective.dal.commands;

import org.common.service.ServiceRegister;
import org.objective.command.AuthToken;
import org.objective.command.Command;
import org.objective.command.CommandResult;

import org.objective.service.DalService;
import static org.utils.fp.collection.CollectionFactory.*;
/**
 *
 * @author gus
 */
public class BaseObjectSequenceCommand  implements Command<Long>
{
    private static final long serialVersionUID = -2187535185148784251L;

    @Override
    public Object[] getParameters()
    {
        return emptyArray();
    }

    @Override
    public CommandResult<Long> execute(ServiceRegister provider, AuthToken token) throws Exception
    {
        DalService dal = provider.getService(DalService.class);
        return dal.getSequenceIDForBaseOject();
    }
}
